#include<iostream>
using namespace std;

const int MAXSIZE = 100;

typedef int ElemType;

typedef struct seqStack
{
	ElemType data[MAXSIZE];
	int top;
}tSeqStack;

tSeqStack *s;

void Push(ElemType e)
{
	if(s->top==MAXSIZE-1)
	{
		return ;
	}
	(s->top)++;
	s->data[s->top] = e;
}

void Pop()
{
	if(s->top == -1)
	{
		return ;
	}
	cout<<s->data[s->top]<<endl;
	(s->top)--;
}

int main()
{
	int a[]={10,9,8,7,6,5,4,3,2,1};
	int len =  sizeof(a)/sizeof(a[0]);
	s = new tSeqStack();
	s->top = -1;
	for(int i=0;i<len;i++)
		Push(a[i]);

	for(int i=0;i<len;i++)
		Pop();
	
	return 0;

}

